package com.escool.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.escool.dao.EmpleadoDAO;
import com.escool.model.TbPersonal;
@Service
public class EmpleadoServiceImpl implements EmpleadoService{
	
	@Autowired
	EmpleadoDAO empleadoDAO;

	@Transactional
	public void addEmpleado(TbPersonal tbPersonal) {
		// TODO Auto-generated method stub
		empleadoDAO.addEmpleado(tbPersonal);
	}

	@Transactional
	public void updateEmplado(TbPersonal tbPersonal) {
		// TODO Auto-generated method stub
		empleadoDAO.updateEmplado(tbPersonal);
	}

	@Transactional
	public TbPersonal findEmpleado(int id) {
		// TODO Auto-generated method stub
		return empleadoDAO.findEmpleado(id);
	}

	@Transactional
	public void delEmpleado(int id) {
		// TODO Auto-generated method stub
		empleadoDAO.delEmpleado(id);
	}

	@Transactional
	public List<TbPersonal> listEmpleado() {
		// TODO Auto-generated method stub
		return empleadoDAO.listEmpleado();
	}

}
